<!DOCTYPE html>
<html lang="en" dir="ltr" class="no-js">
<head>
    <meta charset="utf-8" />
    <title>Workcraft - help:petri_net_plugin</title>
    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
    <meta name="generator" content="DokuWiki"/>
<meta name="robots" content="noindex,nofollow"/>
<meta name="date" content="2014-10-01T15:01:07+0000"/>
<meta name="keywords" content="help,petri net plugin"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="Workcraft"/>
<link rel="start" href="petri_net_plugin.html"/>
<link rel="contents" href="petri_net_plugin.html" title="Sitemap"/>
<link rel="alternate" type="application/rss+xml" title="Changes" />
<link rel="alternate" type="application/rss+xml" title="Current namespace" />
<link rel="alternate" type="text/html" title="Plain HTML" href="_export/xhtml/help/petri_net_plugin.xhtml"/>
<link rel="alternate" type="text/plain" title="Wiki Markup" href="_export/raw/help/petri_net_plugin.raw"/>
<link rel="canonical" href="http://www.workcraft.org/help/petri_net_plugin"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.dokuwiki-light-export.css"/>
<script type="text/javascript">/*<![CDATA[*/var NS='help';var JSINFO = {"id":"help:petri_net_plugin","namespace":"help"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.dokuwiki-light-export.js"></script>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <link rel="shortcut icon" href="favicon.ico" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
    </head>

<body>
    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site dokuwiki mode_show tpl_dokuwiki-light-export     ">

        
<!-- ********** HEADER ********** -->
<div id="dokuwiki__header"><div class="pad group">

        <h1><a href="start.html"  title="Workcraft start page"><img src="logo.png" width="327" height="57" alt="" /></a></h1>
    
    <div class="tools group">
        <!-- USER TOOLS -->
                    <div id="dokuwiki__usertools">
                <h3 class="a11y">User Tools</h3>
                <ul>
                    <li><a href="petri_net_plugin.html"  class="action login" rel="nofollow" title="Login">Login</a></li>                </ul>
            </div>
        
        <!-- SEARCH TOOLS -->
        <div id="dokuwiki__searchtools">
            <h3 class="a11y"></h3>
            <form action="start.html" accept-charset="utf-8" class="search" id="dw__search" method="get" role="search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" class="edit" title="[F]" /><input type="submit" value="Search" class="button" title="Search" /><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>        </div>

        <!-- SITE TOOLS -->
        <div id="dokuwiki__sitetools">
            <h3 class="a11y">Site Tools</h3>
                            <div class="mobileTools">
                    <li><a href="petri_net_plugin.html"  class="action login" rel="nofollow" title="Login">Login</a></li>                </div>
                <ul>
                                    </ul>
                    </div>
    </div>

    <!-- BREADCRUMBS -->
    
    
    <hr class="a11y" />
</div></div><!-- /header -->

        <div class="wrapper group">

            
            <!-- ********** CONTENT ********** -->
            <div id="dokuwiki__content"><div class="pad group">
                <div class="pageId"><span>help:petri_net_plugin</span></div>
                <div class="page group">
                                                            <!-- wikipage start -->
                    <!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>

<ul class="toc">
<li class="level1"><div class="li"><a href="#capturing">Capturing</a></div></li>
<li class="level1"><div class="li"><a href="#editing">Editing</a></div></li>
<li class="level1"><div class="li"><a href="#simulation">Simulation</a></div></li>
<li class="level1"><div class="li"><a href="#verification">Verification</a></div></li>
</ul>
</div>
</div>
<!-- TOC END -->

<h1 class="sectionedit1" id="petri_net_plugin">Petri Net plugin</h1>
<div class="level1">
<div class="wrap_important plugin_wrap">
<p>
Familiarise yourself with <a href="toc_generic.html" class="wikilink1" title="help:toc_generic">Workcraft interface</a> to learn its common features that are available for all plugins.
</p>
</div>
<p>
This plugin is intended for capturing, simulation and verification of Petri net models. 
</p>

</div>

<h2 class="sectionedit4" id="capturing">Capturing</h2>
<div class="level2">

<p>
In order to create a Petri net work choose <em>File→Create work…</em> menu item. In the <em>New work</em> dialogue box select <em>Petri Net</em> as the model type. You may also want to give the work some meaningful name, e.g. <em>pn-test1</em>, otherwise it will be created with <em>Untitled</em> name. Click <em>OK</em> or press <kbd>Enter</kbd> to create the work.
</p>

<p>
<img src="new_work-petri_net.png" class="mediacenter" title="New work of Petri net type" alt="New work of Petri net type" />
</p>

<p>
A Petri net model can be captured by dropping places and transitions onto the editor panel and connecting them with the producing and consuming arcs. 
</p>

<p>
With the place generator <img src="editor_tools-place.png" class="media" title="[P] Place" alt="[P] Place" /> or transition generator <img src="editor_tools-transition.png" class="media" title="[T] Transition" alt="[T] Transition" /> activated you can create a series of places or transition respectively, by clicking the editor panel in the position you want a new node to appear. 
</p>

<p>
When the connection tool <img src="editor_tools-connect.png" class="media" title="[C] Connect" alt="[C] Connect" /> is active you can connect places and transitions with arcs by first click the source node and then the destination node. If you hold <kbd>Ctrl</kbd> then the destination node becomes a source for the next arc making it easier to form a sequence of connected nodes. Note that places can only be connected to transitions and transitions can only be connected to places. If you attempt to connect two nodes of the same type, then a warning will be issued that connections is not valid. 
</p>

<p>
<img src="petri_net-invalid_connection.png" class="mediacenter" title="Connecting Petri net nodes" alt="Connecting Petri net nodes" />
</p>

</div>

<h2 class="sectionedit5" id="editing">Editing</h2>
<div class="level2">

<p>
For editing the model activate the selection tool <img src="editor_tools-select.png" class="media" title="[S] Select" alt="[S] Select" />. All the standard editing features (select, drag-and-drop, delete, copy, undo, group, etc.) work the same - see generic help on <a href="tool_controls_panel.html#selection_controls" class="wikilink1" title="help:tool_controls_panel">Selection controls</a> and <a href="property_editor_panel.html" class="wikilink1" title="help:property_editor_panel">Property editor</a> for details. 
</p>

<p>
<img src="petri_net-editing.png" class="mediacenter" title="Editing Petri net nodes" alt="Editing Petri net nodes" />
</p>

<p>
The only new editing feature is double clicking on a place:
</p>
<ul>
<li class="level1"><div class="li">
 Double-click on an empty place to mark it with a token. 
</div></li>
<li class="level1"><div class="li">
 Double-click a place marked with a token to remove the token. 
</div></li>
<li class="level1"><div class="li">
 If a place has more than one token then double-clicking does not have any effect.
</div></li>
</ul>


<p>
Similar to all the other plugins, textual comments can be created by activating the <img src="editor_tools-text_note.png" class="media" title="[N] Text Note" alt="[N] Text Note" /> tool and clicking the editor panel in the position you want to put the text. Double-click on the note box to edit its text label in-place or do it through the property editor panel when the note is selected.
</p>

</div>

<h2 class="sectionedit6" id="simulation">Simulation</h2>
<div class="level2">

<p>
For simulation of a Petri net model activate the simulation tool <img src="editor_tools-simulate.png" class="media" title="[M] Simulate" alt="[M] Simulate" />. The enabled transitions are highlighted and can be fired by clicking them. The <em>Tool controls</em> panel of the simulation tool provides the means for analysis and navigation through the simulation trace, see generic help on <a href="tool_controls_panel.html#simulation_controls" class="wikilink1" title="help:tool_controls_panel">Simulation controls</a> for details.
</p>

<p>
<img src="petri_net-simulation.png" class="mediacenter" title="Simulating Petri net" alt="Simulating Petri net" />
</p>

</div>

<h2 class="sectionedit7" id="verification">Verification</h2>
<div class="level2">

<p>
A Petri net can be verified for deadlocks via <em>Tools→Verification→Check for deadlocks [MPSat]</em> menu. Custom properties can be verified by formulating a reachability analysis problem in <a href="reach.html" class="wikilink1" title="help:reach">Reach language</a>. This is done a specialised MPSat configuration window accessible via <em>Tools→Verification→Custom properties[MPSat]…</em> menu.
</p>

<p>
If the verified property is not satisfied, then a trace (or several traces) leading to the violation is reported. The trace can be passed to the the simulation tool (by clicking the <em>Play</em> button) for playback and analysis of the reasons leading to the violation.
</p>

<p>
<img src="petri_net-verification.png" class="mediacenter" title="Verification for deadlock" alt="Verification for deadlock" />
</p>

</div>

                    <!-- wikipage stop -->
                                    </div>

                                            </div></div><!-- /content -->

            <hr class="a11y" />

            <!-- PAGE ACTIONS -->
            <div id="dokuwiki__pagetools">
                        </div>
        </div><!-- /wrapper -->

        
<!-- ********** FOOTER ********** -->
<div id="dokuwiki__footer"><div class="pad">
    
    <div class="buttons">
                <a href="http://www.dokuwiki.org/donate" title="Donate" ><img
            src="lib/tpl/dokuwiki-light-export/images/button-donate.gif" width="80" height="15" alt="Donate" /></a>
        <a href="http://www.php.net" title="Powered by PHP" ><img
            src="lib/tpl/dokuwiki-light-export/images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a>
        <a href="http://validator.w3.org/check/referer" title="Valid HTML5" ><img
            src="lib/tpl/dokuwiki-light-export/images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a>
        <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" ><img
            src="lib/tpl/dokuwiki-light-export/images/button-css.png" width="80" height="15" alt="Valid CSS" /></a>
        <a href="http://dokuwiki.org/" title="Driven by DokuWiki" ><img
            src="lib/tpl/dokuwiki-light-export/images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
    </div>

    <div class="userInfo">
            </div>
</div></div><!-- /footer -->

    </div></div><!-- /site -->

    <div class="no"><img  width="2" height="1" alt="" /></div>
    <div id="screen__mode" class="no"></div>    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
</body>
</html>

